-
Notifications
You must be signed in to change notification settings - Fork 267
fix(markers): apply lazy evaluation to markers #877
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
3737cf9
to
f95379c
Compare
Is this different to #834 ? |
@wimglenn Thank you, I just noticed this PR. In fact, #834 is still eager, but it allows exceptions to exist and considers them during evaluation. The implementation also doesn't look so clean By making the evaluation lazy there would be a minor breaking change that illegal markers will be missed if being shortcutted. |
FWIW PR #834 started off as a simple lazy evaluation like this but discussion on issue #774 indicated an aversion to the edge cases this approach introduces with order dependency and silently ignoring malformed expressions. |
Yes, the packaging maintainers need to give clear guidance here, I think we have narrowed down to there only being 4 options on solving the practical problem users are facing:
If the answer is 4 I am willing to start the discussion on clarifying the spec, specifically the two separate standards topics: packaging rejecting solution 1. And whether the spec allows for 2 or 3. I do not have the capacity to propose a new solution, but I am willing to explain the practical issues and put forth the already outlined options to see if there is a consensus in the Python packaging community. |
This is not true, malformed expressions will be rejected by the parser and are never caught by the evaluation. |
Can you please add additional tests for this, assuming they don't exist already. My experience working on pre-releaes is packaging is far from exhaustively tested on edge cases. |
Signed-off-by: Frost Ming <[email protected]>
Signed-off-by: Frost Ming <[email protected]>
f95379c
to
aada1f2
Compare
I should have been more specific, but I meant this repo's non-standard error in cases of "bad" version comparisons. |
Signed-off-by: Frost Ming <[email protected]>
a1450a6
to
2e4b85b
Compare
IIUC you mean |
Signed-off-by: Frost Ming [email protected]
Fix #774
Change the marker evaluation to lazy evaluation so it is possible for boolean shortcuts. I didn't test but there should also be a performance gain.